//
//  MyViewController.m
//  HWPromoteProjectAPP
//
//  Created by 陈道斌 on 2020/1/20.
//  Copyright © 2020 陈道斌. All rights reserved.
//

#import "MyViewController.h"
#import "MyicoImageModel.h"
#import "HWContactUsViewController.h" // 关于我们
#import "HWPrepaidPhoneRecordsjiluViewController.h" //充值记录
#import "HWApplyjiesuanViewController.h"
#import "HWChangchyongViewController.h"
#import "HWChangeThePasswordViewController.h"
#import "HWLoginViewController.h"
#import "HWShirenzhengViewController.h" // 实名认证
#import "HWPersonalInformationViewController.h"
#import "HWBillingDetailsViewController.h" // 结算明细
 



@interface MyViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(strong,nonatomic) UITableView *mainTabelView;
@property(strong,nonatomic) UIView *hederView;
@property(strong,nonatomic) UIView *lanSeView;

@property(strong,nonatomic)UIView *kanpianbaiseView;
@property(strong,nonatomic)UIImageView *icoimageView;
@property(strong,nonatomic) UILabel *mingchenLabel;  // 名称
@property(strong,nonatomic) UILabel *keyongeduLabel; //
@property(strong,nonatomic) UILabel *keyongjingerLabel; //

@property(strong,nonatomic) UILabel *mioashuyufuLabel; //
@property(strong,nonatomic) UILabel *yufujingeLabel; // 预付

@property(strong,nonatomic) UILabel *miaoshutuiLabel; // 描述推
@property(strong,nonatomic) UILabel *tuiguanjingerLabel;

@property(strong,nonatomic) NSMutableArray *dataMutableArr;
@property(strong,nonatomic) UIView *bottomView;
@property(strong,nonatomic) NSString *cunchuStr;


@property(strong,nonatomic) UIButton *chongzhiBut; // 充值
@property(strong,nonatomic) UIButton *tixianBut; // 提现


@property(strong,nonatomic) NSDictionary *datadic;

@end

@implementation MyViewController


- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:YES ];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO];
 
}


- (UITableView *)mainTabelView {
    
    if (_mainTabelView == nil) {
        _mainTabelView = [[UITableView alloc]initWithFrame:CGRectMake(0, -StatusBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT) style:UITableViewStylePlain];
        _mainTabelView.delegate = self;
        _mainTabelView.dataSource = self;
        _mainTabelView.backgroundColor =beijingyanSe;
        

    }

    return _mainTabelView;
    
    
    
    
}





- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = beijingyanSe;
    //添加
    [self addheaderView];
    
    [self addKapianView];
    
    
    
    [self sendNetworkRequest];
    
    
    
    
    
}






//添加头部UIview
- (void)addheaderView {
    
    [self.view addSubview:self.mainTabelView];
    
    self.hederView  = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    self.hederView.backgroundColor = beijingyanSe;
    
    self.mainTabelView.tableHeaderView = self.hederView;
    self.mainTabelView.tableFooterView = [[UIView alloc]init];
    
    self.lanSeView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, StatusBarHeight+186)];
    self.lanSeView.backgroundColor = RGB(85, 89, 234);
    
    [self.hederView addSubview: self.lanSeView];
    
    
     UIButton *tuichuButton = [UIButton buttonWithType:UIButtonTypeCustom];
     tuichuButton.frame = CGRectMake( SCREEN_WIDTH-55-15,StatusBarHeight,55,35);
     [tuichuButton setTitle:@"退出登录" forState:UIControlStateNormal];
     [tuichuButton setTitleColor:RGB(255, 255, 255) forState:UIControlStateNormal];
     tuichuButton.titleLabel.font = [UIFont systemFontOfSize:12];
     [tuichuButton addTarget:self action:@selector(tuichuttonTap) forControlEvents:UIControlEventTouchUpInside];
 //    http://shouyou.94php.com/?ct=download
  //  tuichuButton.backgroundColor = [UIColor redColor];
    
    
//      tuichuButton.layer.cornerRadius = 11;
//      tuichuButton.layer.masksToBounds  = YES;
//    tuichuButton.layer.borderWidth = 1;
//    tuichuButton.layer.borderColor = RGB(255, 255, 255).CGColor;
     // wangjibutton.backgroundColor = [UIColor redColor];
    [self.lanSeView addSubview:tuichuButton];


}


// 添加卡片UIView
- (void)addKapianView {
    
    self.kanpianbaiseView = [[UIView alloc]initWithFrame:CGRectMake(20, StatusBarHeight+44, SCREEN_WIDTH-40, 249)];
    self.kanpianbaiseView.backgroundColor = [UIColor whiteColor];
    self.kanpianbaiseView.layer.cornerRadius = 12;
    self.kanpianbaiseView.layer.masksToBounds = YES;
    [self.hederView addSubview:self.kanpianbaiseView];
    
    
    self.icoimageView = [[UIImageView alloc]initWithFrame:CGRectMake(30, 20, 64, 64)];
    self.icoimageView.backgroundColor = [UIColor redColor];
    self.icoimageView.layer.cornerRadius = 12;
    self.icoimageView.layer.masksToBounds = YES;
    [self.kanpianbaiseView addSubview:self.icoimageView];
    
    
      UILabel  *changyongLabel   = [[UILabel alloc]initWithFrame:CGRectMake( self.icoimageView.right+10, 35, 200, 25)];
      changyongLabel.text = @"数据统计";
      changyongLabel.textAlignment =  NSTextAlignmentLeft;
      changyongLabel.textColor = RGB(68, 68, 68);
      changyongLabel.font = [UIFont systemFontOfSize:12];
      self.mingchenLabel = changyongLabel;
      [self.kanpianbaiseView  addSubview:changyongLabel];
    
    
    

    
       UILabel  *keyongeduLabel   = [[UILabel alloc]initWithFrame:CGRectMake(36, self.icoimageView.bottom+30, 200, 17)];
       keyongeduLabel.text = @"可用余额（元）";
       keyongeduLabel.textAlignment =  NSTextAlignmentLeft;
       keyongeduLabel.textColor = RGB(193, 193, 203);
       keyongeduLabel.font = [UIFont systemFontOfSize:12];
       self.keyongeduLabel = keyongeduLabel;
    
       self.keyongeduLabel.hidden = YES;
    
       [self.kanpianbaiseView  addSubview:keyongeduLabel];
    
    
    
        UILabel  *keyongjingerLabel   = [[UILabel alloc]initWithFrame:CGRectMake( 36, self.keyongeduLabel.bottom+1, 200, 37)];
        keyongjingerLabel.text = @"66.00";
        keyongjingerLabel.textAlignment =  NSTextAlignmentLeft;
        keyongjingerLabel.textColor = RGB(68, 68, 68);
        keyongjingerLabel.font = [UIFont systemFontOfSize:26];
        self.keyongjingerLabel = keyongjingerLabel;
         self.keyongjingerLabel.hidden = YES;
     
        [self.kanpianbaiseView  addSubview:keyongjingerLabel];
    
        
    
     UIView *hongseview = [[UIView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-40-32*3-39, 129, 32*3, 30)];
     hongseview.backgroundColor = [UIColor whiteColor];
     [self.kanpianbaiseView  addSubview:hongseview];
    
     UIView *shuxing = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 3, 24)];
     shuxing.backgroundColor = RGB(204, 204, 204);
     [self.kanpianbaiseView addSubview:shuxing];
    
    
    
    
       UIButton *tixianButton = [UIButton buttonWithType:UIButtonTypeCustom];
      tixianButton.frame = CGRectMake(0,0,32, 30);
      [tixianButton setTitle:@"提现" forState:UIControlStateNormal];
      [tixianButton setTitleColor:RGB(85, 89, 234) forState:UIControlStateNormal];
      [tixianButton addTarget:self action:@selector(tixiantap) forControlEvents:UIControlEventTouchUpInside];
      self.tixianBut = tixianButton;
      self.tixianBut.hidden = YES;
    
    
    //      tuichuButton.layer.cornerRadius = 11;
    //      tuichuButton.layer.masksToBounds  = YES;
    //    tuichuButton.layer.borderWidth = 1;
    //    tuichuButton.layer.borderColor = RGB(255, 255, 255).CGColor;
         // wangjibutton.backgroundColor = [UIColor redColor];
      tixianButton.titleLabel.font = [UIFont systemFontOfSize:14];
    
        [hongseview addSubview:tixianButton];
    
    
        UIButton *chongzhiButton = [UIButton buttonWithType:UIButtonTypeCustom];
        chongzhiButton.frame = CGRectMake(32*2,0,32, 30);
        [chongzhiButton setTitle:@"充值" forState:UIControlStateNormal];
        [chongzhiButton setTitleColor:RGB(68, 68, 68) forState:UIControlStateNormal];
        [chongzhiButton addTarget:self action:@selector(chongzhitap) forControlEvents:UIControlEventTouchUpInside];
        chongzhiButton.hidden = YES;
        self.chongzhiBut = chongzhiButton;
        self.chongzhiBut.hidden = YES;
      
      //      tuichuButton.layer.cornerRadius = 11;
      //      tuichuButton.layer.masksToBounds  = YES;
      //    tuichuButton.layer.borderWidth = 1;
      //    tuichuButton.layer.borderColor = RGB(255, 255, 255).CGColor;
           // wangjibutton.backgroundColor = [UIColor redColor];
         chongzhiButton.titleLabel.font = [UIFont systemFontOfSize:14];
      
          [hongseview addSubview:chongzhiButton];

    
    
      UIView *yufuView = [[UIView alloc]initWithFrame:CGRectMake(36, self.keyongjingerLabel.bottom+20, 150, 19+22)];
      yufuView.backgroundColor = [UIColor whiteColor];
      [self.kanpianbaiseView addSubview:yufuView];
    

      UILabel  *yuxjdjulabel   = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 150, 17)];
      yuxjdjulabel.text = @"预付款金额（元）";
      yuxjdjulabel.textAlignment =  NSTextAlignmentLeft;
      yuxjdjulabel.textColor = RGB(193, 193, 203);
      yuxjdjulabel.font = [UIFont systemFontOfSize:12];
     self.mioashuyufuLabel = yuxjdjulabel;
     self.mioashuyufuLabel.hidden = YES;
    
      [yufuView addSubview:yuxjdjulabel];
    
       UILabel  *shuliyuxjdjulabel   = [[UILabel alloc]initWithFrame:CGRectMake(0, 19, 150, 17)];
       shuliyuxjdjulabel.text = @"46.00";
       shuliyuxjdjulabel.textAlignment =  NSTextAlignmentLeft;
       shuliyuxjdjulabel.textColor = RGB(68, 68, 68);
       self.yufujingeLabel = shuliyuxjdjulabel;
     self.yufujingeLabel.hidden = YES;
       shuliyuxjdjulabel.font = [UIFont systemFontOfSize:15];
       [yufuView addSubview:shuliyuxjdjulabel];
    
    
        UIView *yufuView1 = [[UIView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-40-32*3-39, self.keyongjingerLabel.bottom+20, 150, 19+22)];
           yufuView1.backgroundColor = [UIColor whiteColor];
           [self.kanpianbaiseView addSubview:yufuView1];
         
           
           UILabel  *yuxjdjulabel1   = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 150, 17)];
           yuxjdjulabel1.text = @"推广金额（元）";
           yuxjdjulabel1.textAlignment =  NSTextAlignmentLeft;
           yuxjdjulabel1.textColor = RGB(193, 193, 203);
           yuxjdjulabel1.font = [UIFont systemFontOfSize:12];
           self.miaoshutuiLabel = yuxjdjulabel1;
            self.miaoshutuiLabel.hidden = YES;
    
           [yufuView1 addSubview:yuxjdjulabel1];
         
           UILabel  *shuliyuxjdjulabel1   = [[UILabel alloc]initWithFrame:CGRectMake(0, 19, 150, 17)];
           shuliyuxjdjulabel1.text = @"20.00";
           shuliyuxjdjulabel1.textAlignment =  NSTextAlignmentLeft;
           shuliyuxjdjulabel1.textColor = RGB(68, 68, 68);
           shuliyuxjdjulabel1.font = [UIFont systemFontOfSize:15];
           self.tuiguanjingerLabel = shuliyuxjdjulabel1;
              self.tuiguanjingerLabel.hidden = YES;
           [yufuView1 addSubview:shuliyuxjdjulabel1];
    
    
    
    
}







// 发送网络请求
- (void)sendNetworkRequest {
    
    
    
     
         NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
         NSString *uid =  [HWLocallyStoredData getLoginUserID];
         NSString *signStr = [NSString stringWithFormat:@"%@%@%@",uid,tStr,@"adesxloksy13s98adv"];
         NSString  *signStrMd5  =   [WMUtil md5HexDigest:signStr];
           
        
        
        
          NSDictionary *parametes = @{      @"ios" : @"1",
                                       @"ct" : @"app",
                                        @"ac" : @"my",
                                        @"t" : tStr,
                                        @"uid":uid,
                                        @"sign" :signStrMd5
                                        };
        
        
            [HWWebUtils doGetWithParameters:parametes progress:nil success:^(id response) {
                  
                 

                  NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];
                  if ([codeStr intValue] == 1) {
                 
                        NSLog(@"%@",response);
                        self.datadic = response[@"data"];
                      
                       self.dataMutableArr = [MyicoImageModel mj_objectArrayWithKeyValuesArray:response[@"data"][@"function"]];
                      
                       [self.icoimageView sd_setImageWithURL:[NSURL URLWithString:self.datadic[@"head"]] placeholderImage:nil];
                      
                      self.mingchenLabel.text = [NSString stringWithFormat:@"%@",self.datadic[@"username"]];
                      
                      self.keyongjingerLabel.text = [NSString stringWithFormat:@"%@",self.datadic[@"shareMoney"]];
                      
                      
                      self.cunchuStr = [NSString stringWithFormat:@"%@",self.datadic[@"shareMoney"]];
                      
                      self.yufujingeLabel.text = [NSString stringWithFormat:@"%@",self.datadic[@"yufu"]];
                      self.tuiguanjingerLabel.text = [NSString stringWithFormat:@"%@",self.datadic[@"money"]];
                      
                      NSString  *pay =  [NSString stringWithFormat:@"%@",response[@"pay"]];
                      
                      
                      
                      
                      
                      if ([pay integerValue] == 1) {
                          
                          self.chongzhiBut.hidden = NO;
                          self.tixianBut.hidden = NO;
                          
                          self.keyongeduLabel.hidden = NO;
                          self.keyongjingerLabel.hidden = NO;
                          
                          self.mioashuyufuLabel.hidden = NO;
                          self.yufujingeLabel.hidden = NO;
                          
                           self.tuiguanjingerLabel.hidden = NO;
                           self.miaoshutuiLabel.hidden = NO;
                          
                          
                          self.kanpianbaiseView.frame = CGRectMake(20, StatusBarHeight+44, SCREEN_WIDTH-40, 249);
                          
                          
                          
                      } else if ([pay integerValue] == 2)  {
                                               
                           self.chongzhiBut.hidden = YES;
                            self.tixianBut.hidden = YES;
                            self.keyongeduLabel.hidden = YES;
                            self.keyongjingerLabel.hidden = YES;
                           
                           self.mioashuyufuLabel.hidden = YES;
                            self.yufujingeLabel.hidden = YES;
                          
                          self.miaoshutuiLabel.hidden = YES;
                          self.tuiguanjingerLabel.hidden = YES;
                          
                          self.kanpianbaiseView.frame = CGRectMake(20, StatusBarHeight+44, SCREEN_WIDTH-40, 160);
                         
                                               
                      }
                      
                      
                      
                      [self addtoAddTodibuView];
                      
                      
                      
                      
                      
                       
                  } else {
                      
                    [MBProgressHUD showError:response[@"message"]];
                                    
                
                      
                  }
                  
             
                  
              } failure:^(NSString *error) {
                 // [SVProgressHUD dismiss];
                  
                   [MBProgressHUD showSuccess:@"登录失败"];
                  [MBProgressHUD hideHUD];
                  
                  
              }];
        
    
    
    
    
    
    
    
}

// 添加底部UIView
- (void)addtoAddTodibuView  {
    
    self.bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, self.kanpianbaiseView.bottom+20, kScreenW, 164)];
    self.bottomView.backgroundColor = [UIColor whiteColor];
    [self.hederView addSubview: self.bottomView];
    
    
    
    
    NSArray *fanlilistArr = @[@"推广盒子",@"推广游戏",@"申请游戏",@"折扣代充",@"分成结算",@"分成明细",@"我要提现",@"提现明细"];
       NSArray   *paihangbangcoArr = @[@"hezi_ico",@"tuiguan_ico",@"shengqingyouxi",@"zhekou",@"fencheng_ico",@"mingxi_ico",@"tixian_ico",@"tixianmingxi_ico"];
       CGFloat hengjianjuLiin = (kScreenW-  55*3)/4;
//       self.imageMuArr = [[NSMutableArray alloc]init];
//       self.labelMuArr = [[NSMutableArray alloc]init];
       for (int i = 0 ; i < self.dataMutableArr.count; i++) {
       
           int row = i/3;
           int line = i%3;
//           int shulian = (line*2+2) -1;

           UIView *redview = [[UIView alloc]initWithFrame:CGRectMake(hengjianjuLiin+hengjianjuLiin*line+line*55, 20+row*30+row*47, 55,47 )];
           redview.tag = i;
           redview.backgroundColor = [UIColor whiteColor];
            //   redview.backgroundColor = [UIColor redColor];
           [ self.bottomView  addSubview:redview];
           
           
           
           MyicoImageModel *modle = self.dataMutableArr[i];
           
           
           
           
           UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imviewTaKaifu:)];
           [redview addGestureRecognizer:tap1];
           
           
           UIImageView *imview = [[UIImageView alloc]initWithFrame:CGRectMake(15, 0,  24, 24)];
           imview.image = [UIImage imageNamed:paihangbangcoArr[i]];
           imview.userInteractionEnabled = YES;
           imview.tag = i;
           [redview addSubview:imview];
           
           [imview sd_setImageWithURL:[NSURL URLWithString:modle.image] placeholderImage:nil];
           
           
           
      //     [self.imageMuArr addObject:imview];
           
       
           
          // UILabel
           UILabel *nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 30, 55, 17)];
           nameLabel.text = fanlilistArr[i];
           nameLabel.textAlignment = NSTextAlignmentCenter;
           nameLabel.font = [UIFont systemFontOfSize:12];
           nameLabel.textColor = RGB(68, 68, 68);
           [redview addSubview:nameLabel];
           
           nameLabel.text =  [NSString stringWithFormat:@"%@",modle.title];
        //   [self.labelMuArr addObject:nameLabel];
           
       
       }
    
    
    
}





//退出登录
- (void)tuichuttonTap {
    
    DLog(@"推出登录");
    
     NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
     [defaults  removeObjectForKey:@"uid"];
     [defaults  removeObjectForKey:@"username"];
      [defaults  removeObjectForKey:@"head"];
     [defaults synchronize];
     HWLoginViewController *login = [[HWLoginViewController alloc]init];
    kKeyWindow.rootViewController = login;
    
}





// 设置
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 0;
    
    
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    
    
    static NSString *cellID = @"cellID";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    

    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    
    
    return  cell;
    
    
    
    

    
    
}




// 提现
- (void)tixiantap {
    
    HWApplyjiesuanViewController *app = [[HWApplyjiesuanViewController alloc]init];
    app.jisuanStr = [NSString stringWithFormat:@"%@",self.datadic[@"shareMoney"]];
    [self.navigationController pushViewController:app animated:YES];
    
    
    
}

// 充值
- (void)chongzhitap {
    
    HWChangchyongViewController *Changchyong = [[HWChangchyongViewController alloc]init];
  //   Changchyong.cunchuStr = self.cunchuStr;
    
    
      Changchyong.cunchuStr =  [NSString stringWithFormat:@"%@",self.datadic[@"yufu"]];
    
    
    [self.navigationController pushViewController:Changchyong animated:YES];
    

    
}



- (void)imviewTaKaifu:(UITapGestureRecognizer *)sender {
    
    
        UIView *view =  sender.view;
        NSLog(@"%d",view.tag);
    
    
    
       MyicoImageModel *modle = self.dataMutableArr[view.tag];
       
      if ([modle.type isEqualToString:@"17"]) {
        
        
         HWPersonalInformationViewController *pesc = [[HWPersonalInformationViewController alloc]init];
        [self.navigationController pushViewController:pesc animated:YES];
        
        
        
         
      } else if ([modle.type isEqualToString:@"18"]) {
        
        // 判断是否是命认证
        [self shifoshimingrenzheng];
        
//        HWShirenzhengViewController *Shirenzheng = [[HWShirenzhengViewController alloc]init];
//        [self.navigationController pushViewController:Shirenzheng animated:YES];
        
        
        
        

        
    }else if ([modle.type isEqualToString:@"19"]) {
        
        HWChangeThePasswordViewController *cha = [[HWChangeThePasswordViewController alloc]init];
        [self.navigationController pushViewController:cha animated:YES];
        
        
        
        
    }else if ([modle.type isEqualToString:@"20"]) {
        
        HWPrepaidPhoneRecordsjiluViewController  *PrepaidPhone = [[HWPrepaidPhoneRecordsjiluViewController alloc]init];
        [self.navigationController pushViewController:PrepaidPhone animated:YES];
        
        
        
    }else if ([modle.type isEqualToString:@"5"]) {
        
        
        HWBillingDetailsViewController *billing = [[HWBillingDetailsViewController alloc]init];
         [self.navigationController pushViewController:billing animated:YES];
        
        
        
    }else if ([modle.type isEqualToString:@"22"]) {
        
        HWContactUsViewController  *contact = [[HWContactUsViewController alloc]init];
        [self.navigationController pushViewController:contact animated:YES];
        
        
        
        
        
    }
    
    
    
}


- (void)shifoshimingrenzheng {
    
    
    
        NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
        NSString *uid =  [HWLocallyStoredData getLoginUserID];
        NSString *signStr = [NSString stringWithFormat:@"%@%@%@",uid,tStr,@"adesxloksy13s98adv"];
        NSString  *signStrMd5  =   [WMUtil md5HexDigest:signStr];

        
                
                
                
                  NSDictionary *parametes = @{      @"ios" : @"1",
                                               @"ct" : @"app",
                                                @"ac" : @"shiming",
                                                @"t" : tStr,
                                                @"uid":uid,
    
                                                @"sign" :signStrMd5
                                               
                                                };
                
                
                    [HWWebUtils doGetWithParameters:parametes progress:nil success:^(id response) {
                          
                         

                          NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];
                          if ([codeStr intValue] == 1) {
                         
                              
                           
                                 [MBProgressHUD showSuccess:@"您已经实名认证"];
                              
     
                         
                              
                        
                        

                               
                          } else {
                              
                               [MBProgressHUD showError:response[@"message"]];
                                            
                               HWShirenzhengViewController *Shirenzheng = [[HWShirenzhengViewController alloc]init];
                                [self.navController pushViewController:Shirenzheng animated:YES];
                                      
                              
                          }
                          
                     
                          
                      } failure:^(NSString *error) {
                         // [SVProgressHUD dismiss];
                          
                          [MBProgressHUD showSuccess:@"登录失败"];
                          [MBProgressHUD hideHUD];
                          
                          
                          
                          
                      }];
                
    
    
    
    
}
 


@end
